#ifndef SINGLETON_H__
#define SINGLETON_H__

template <class T>
class stWrapper
{
	public:
		static T&	getInstance();
	
	private:	
		stWrapper();
		static	T*	m_cInstance;
};

template <class T> T* stWrapper<T>::m_cInstance = 0;

template <class T> 
T& stWrapper<T>::getInstance()
{
	if (m_cInstance == 0)
		m_cInstance = new T();
	return *m_cInstance;
}

#endif